package datastructure.tree.twochatree;

/**
 * 树节点类
 *
 * @author 杨 强
 * @package datastructure.tree.two
 * @createTime 2023-03-20 21:47
 */
public class TreeNode {

    /**
     * 当前节点值
     */
    public int value;
    /**
     * 左节点
     */
    public TreeNode left;
    /**
     * 右节点
     */
    public TreeNode right;

    public TreeNode(int value) {
        this.value = value;
    }

    public TreeNode(TreeNode left, int value, TreeNode right) {
        this.value = value;
        this.left = left;
        this.right = right;
    }

    @Override
    public String toString() {
        return String.valueOf(this.value);
    }
}


